package com.hyb.service.impl;

import com.hyb.mapper.RoleMapper;
import com.hyb.pojo.Role;
import com.hyb.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    RoleMapper roleMapper;
    @Override
    public List<Role> getAll() {
        return roleMapper.getAll();
    }

    @Override
    public Role getById(int r_id) {
        return roleMapper.getById(r_id);
    }

    @Override
    public void deleteById(int r_id) {
        roleMapper.deleteById(r_id);
    }

    @Override
    public void addAll(String r_name) {
        roleMapper.addAll(r_name);
    }

    @Override
    public void updateById() {
        roleMapper.updateById();
    }
}
